<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="./js/jquery-3.5.1/jquery-3.5.1.min.js"></script>
<script>
    let baseUrl="http://192.168.154.1:8080/"
    $(function (){

        $.ajax({
            type:"get",
            url:baseUrl+'Category/list?currentPage='+1,
            // async: false,是否异步
            success: function(data)
            {   var arr=[];
                console.log(data.data)
                arr=data.data;
                let $list = $("#list");
                for(let i in arr)
                {
                    let $tr = $("<tr>");
                    let $id = $("<td>").text(arr[i].cateId);
                    let $name = $("<td>").text(arr[i].name);
                    let $statu = $("<td>");
                    if (arr[i].isDelete==1) {$statu.text("正常")}
                    else{$statu.text("下架")}
                    $tr.append($id);
                    $tr.append($name);
                    $tr.append($statu);
                    $list.append($tr);
                }
            }
        })
    })

</script>
<body>
<table id="list">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>状态</th>
    </tr>
</table>
</body>
</html>